import bcrypt from "bcryptjs";

const saltRounds = 10;

// 加密密码
export const hashPassword = (password) => bcrypt.hash(password, saltRounds);

// 验证密码
export const comparePassword = (password, hashedPassword) =>
  bcrypt.compare(password, hashedPassword);
